//
//  YQPAdvisorySelectTypeViewCell.swift
//  MuYing
//
//  Created by tbb on 2019/7/26.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class YQPAdvisorySelectTypeViewCell: YQTableViewBaseCell {
    @objc lazy var iconBtn:UIButton  = {
        let iconBtn = UIButton(type: .custom);
        iconBtn.setImage(UIImage(named: "show_Select_Search_icon"), for: .selected);
//        iconBtn.frame = CGRect(x: 0, y: 0, width: 22, height: 22);
        return iconBtn;
    }()
    
    lazy var lineView: UIView = {
        let lineView = UIView();
        lineView.backgroundColor = appLineViewColor;//UIColorFromHex(rgbValue: 0xF4F4F4);
        return lineView;
    }()
    override func layoutSubviews() {
        super.layoutSubviews();
        self.contentView.backgroundColor = UIColor.white;
        self.textLabel?.font = UIFont.systemFont(ofSize: 14, weight: .medium);
        self.textLabel?.textColor = appMainTitleColor;
        
        //self.accessoryView = self.iconBtn;
        self.contentView.addSubview(self.iconBtn);
        self.iconBtn.mas_makeConstraints { (make) in
            make?.right.mas_equalTo()(-12);
            make?.centerY.mas_equalTo()(0);
            make?.size.mas_equalTo()(CGSize(width: 22, height: 22));
        }
        
        self.contentView.addSubview(self.lineView);
        self.lineView.mas_makeConstraints { (make) in
            make?.bottom.mas_equalTo()(0);
            make?.right.mas_equalTo()(0);
            make?.left.mas_equalTo()(0);
            make?.height.mas_equalTo()(0.5);
        }
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
